package br.com.millenium.service.ferramenta.processaction;

import br.com.millenium.domain.manager.MilleniumManagerFactory;
import lumis.doui.processaction.ProcessActionHandler;
import lumis.portal.PortalException;

@SuppressWarnings("rawtypes")
public class CheckDuplicateAlocacaoFerramentaProcessActionHandler extends ProcessActionHandler
{
	@Override
	public void processAction() throws PortalException 
	{
		String numRegistro          = (String)getParameter ( "numRegistro" );
		String alocacaoFerramentaId = (String)(getParameter( "id"          ));
		
 		if( MilleniumManagerFactory.getFerramentaManager().isDuplicateAlocacaoFerramenta(numRegistro, alocacaoFerramentaId, transaction))
			throw new PortalException( "STR_ALOCACAO_FERRAMENTA_EXISTS;", getResource() );
	}
}
